1. Field of the Invention
The present invention relates to the management of computer implemented file systems. In particular, the present invention relates to the management of caching in file systems for mobile users that routinely disconnect from a server file system.
2. Background and Related Art
Computer systems are used by companies and individuals to manage business and personal matters. The data manipulated by the computer user is stored in a file system resident on the user's computer or on a network server. Storing data on a network server has the advantage of making data available to other people in the company and of reducing the disk storage requirement on individual workstations. Portable computers with limited disk storage particularly benefit from network server storage.
Portable computers provide a computing solution for people who must travel as part of their job, who frequently take work home from their office, or, who for convenience, need to have portable computing solutions. These workers are frequently termed "mobile computer users" or simply "mobile users."
Mobile computing is greatly facilitated by systems and methods that allow the mobile users to connect to a network server and update shared files with the results of his or her work while disconnected. Early methods of resynchronization required the worker to manually copy and compare each file on which they had worked or thought they might have changed. Similarly, if network files had changed, the worker would have to check and copy those files to the portable computer. Newer methods include software programs that automatically compare and resynchronize a network and mobile computer. A specifically designed IBM Mobile File System, goes one step further providing tracking and resynchronization of files as part of a distributed file system function.
Mobile file systems have to support disconnections of clients from the servers to which they are normally connected. This support is provided by caching of files from the server to the client machine whenever a user accesses a file. Implicit caching is the process through which files the user is currently accessing are temporarily stored on the mobile device. The mobile user can then continue to access the files even when disconnected from the server. The user can update these cached files or create new ones. Any changes made to the cached files are logged by the file system and these files are flagged as `dirty`. These `dirty` files must remain in cache until the user reconnects to the server plays these changes back to the server. Mobile file system transaction logging is described in patent application Ser. No. 08/572,923, filed Dec. 15, 1995 entitled "Process and Article of Manufacture for Constructing and Optimizing Transaction Logs for Mobile File Systems."
Explicit caching occurs when the user specifies certain files are to be copied to the mobile machine for later use or update. The user can choose to cache files explicitly by creating a profile of files to be cached. Explicit caching is often called stashing, and is initiated by a user in anticipation of disconnection from the network server.
There is a limited amount of disk space available for caching on portable computers. This limit can be easily reached if the user caches a large number of files explicitly or implicitly while connected to the server. If the user is disconnected from the server for an extended period of time, he or she may completely fill the cache and reach a state where he or she is not able to create any new files or update existing ones. Files may exist that the user has completed working with, but to replace these `dirty` files in the cache, the user would need to first replay and synchronize the changes to the server. A mobile user may not have this option at the time the cache fills. The caching methodology for mobile users must solve the technical problem of managing the cache so a mobile user can continue using the file-system for extended periods of time even while disconnected. Adopting a standard cache replacement policy such as LRU (Least Recently Used) does not by itself meet the requirements of a mobile user since it does not consider the need to resynchronize files with a server. In addition, the caching mechanism must work in a computer system environment that does not reserve an exclusive, fixed size partition for the cache. The lack of a fixed size cache complicates cache management because it imposes a further limit on the amount of space that can used for caching, because the limited portable disk space also is being used for unrelated user and system activity.
File systems such as Coda, that support mobile users, cache files to support disconnections from the network. Coda assigns a priority to each entry in the cache. This priority is a function of an explicit priority specified by the user and an implicit reference priority. The reference priority of an object is based on the total number of references that have occurred since it was last referenced. Coda does not allow the user to explicitly evict cached data. Also, Coda assumes that a partition of fixed size is reserved for the cache. The size of this partition cannot be dynamically varied. See Satyanarayanan et al, "Coda: A Highly Available File System for a Distributed Workstation Environment", IEEE Transactions on Computers, Vol. 39, No. 4, April 1990; Kistler and Satyanarayanan, "Disconnected Operation in the Coda File System", ACM Transactions on Computer Systems, February 1992; and Kistler, "Disconnected Operations in a Distributed File Systems", Ph.D. this is, Department of Computer Science, Carnegie Mellon University, May 1993.